package com.cuz.daileetcode;

import java.util.Scanner;

public class Day24_1 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        if (str==null||str.length()==0){
            System.out.println(0);
            return;
        }
        char[] allChars = str.toCharArray();
        char curChar=allChars[0];
        int curMaxCount = 1;
        int res=1;
        for (int index = 1; index < allChars.length; index++) {
            if (allChars[index]==curChar){
                curMaxCount++;
            }else {
                curChar=allChars[index];
                curMaxCount=1;
            }
            res=Math.max(curMaxCount,res);
        }
        System.out.println(res);
    }
}
